<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<title>运营平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="renderer" content="webkit">
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/common.css?v=20170207" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/table.css?v=20170117" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/jquery-ui.css" />
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-1.11.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ui.min.js" type="text/javascript"></script>
 <script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/yunIndex.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ym-datePlugin-0.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/global.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/cheshan/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery.placeholder.min.js"></script>
<script type="text/javascript">
 $(function(){
     $("input").placeholder();
     if (navigator.userAgent.indexOf("Safari") > -1) {
       $("input").css("lineHeight","normal !important");
     };
});
</script>

</head>
<body>
<div class="header">
<div class="headerCo">
<span>你好,<?php echo ($user_info["real_name"]); ?><a href="<?php echo (WEB_URL); ?>Emp/logout">退出</a></span>
<h1><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_logo.jpg"></h1>
</div>
</div>
<div class="mian">
    <div class="mianL">
    <dl>
        <dd>
            <a id="menu_sy" href="/Index/index" class="shouye">首页</a>
        </dd>
        <?php foreach ($tree_menu as $key => $value): ?>
          <dd>
            <span id="menu_<?php echo ($value['first_char']); ?>" ><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_jia.jpg"><?php echo ($value['name']); ?></span>
            <ul style="display: none;">
                <?php if (!empty($value['children'])): ?>
                    <?php foreach ($value['children'] as $k => $v): ?>
                        <li><a id='menu_<?php echo ($v["first_char"]); ?>' href="<?php echo ($v['url']); ?>"><?php echo ($v['name']); ?></a></li>
                    <?php endforeach ?>
                <?php endif ?>
            </ul>
        <?php endforeach ?>
    </dl>
</div>

<?php $menu = 'cljc.jcsh'; ?>
<?php $menu=json_encode(explode('.', $menu)); ?>
<script>
    $(function () {
        var cur_menu = '<?php echo ($menu); ?>', cur_menu = eval('[' + cur_menu + ']'), cur_menu = cur_menu[0];
        if (cur_menu == "sy") {
            $("#menu_sy").removeClass('shouye').addClass('current');
        }
        $('#menu_' + cur_menu[0]).click();
        $('#menu_' + cur_menu[0]).find("img").attr("src", "http://img1.isou365.cn/paimai/yunying/images/yun_jie.jpg");
        $(".mianL").css("height", $(document).height() - 95);
        $('#menu_' + cur_menu[1]).addClass('current');
    });
</script>
 <?php if($total_car > '1' ): ?><div class="presentation">
        <span><a class="leftBtn" style="display: none"></a><a class="rightBtn"></a></span>
        <div>
            <ul class="clearfix">
                <?php if(is_array($car_id_list)): foreach($car_id_list as $key=>$car_item): ?><li class= "<?php echo $car_id == $car_item['car_id'] ? 'cuurent' : ''; ?>"><a href="/DetectionCheck/check/car_id/<?php echo ($car_item["car_id"]); ?>" >报告<?php echo $total_car - $key;?></a></li><?php endforeach; endif; ?>
            </ul>
        </div>
    </div><?php endif; ?>
    <div class="mianR">
        <?php echo ($report); ?>
        <div class="frame clearfix"><span>车架号</span><em><?php echo ($car["vin"]); ?></em></div>
        <div class="testing">
            <h4>行驶证照片</h4>
            <ul>
                <li class="agreement1 clearfix">
                  <?php if($procedure['travel_license_pic']):?>
                    <span>
                        <img src="<?php echo ($procedure["travel_license_pic"]); ?>@216h_180w" />
                        <em>行驶证照片点击看大图</em>
                    </span>
                  <?php endif;?>
                  <?php if($procedure['travel_license_pic2']):?>
                    <span>

                        <img src="<?php echo ($procedure["travel_license_pic2"]); ?>@216h_180w" />
                        <em>行驶证照片点击看大图</em>
                    </span>
                  <?php endif;?>
                  <?php if($procedure['travel_license_pic3']):?>
                    <span>
                        <img src="<?php echo ($procedure["travel_license_pic3"]); ?>@216h_180w" />
                        <em>行驶证照片点击看大图</em>
                    </span>
                  <?php endif;?>
                </li>
            </ul>
        </div>
        <div class="testing">
            <h4>登记证照片</h4>
            <ul class="clearfix">
                <li class="agreement1 clearfix">
                  <span>
                    <?php if($procedure['reg_cert_pic']):?>
                      <img src="<?php echo ($procedure["reg_cert_pic"]); ?>@216h_180w" /><em>登记证照片点击看大图</em>
                    <?php endif;?>
                  </span>

                  <span>
                    <?php if($procedure['reg_cert_pic2']):?>
                      <img src="<?php echo ($procedure["reg_cert_pic2"]); ?>@216h_180w" /><em>登记证照片点击看大图</em>
                    <?php endif;?>
                  </span>
                  <span>
                    <?php if($procedure['reg_cert_pic3']):?>
                      <img src="<?php echo ($procedure["reg_cert_pic3"]); ?>@216h_180w" /><em>登记证照片点击看大图</em>
                    <?php endif;?>
                  </span>
                </li>
            </ul>
        </div>

        <div class="testing">
            <h4>协议详情</h4>
            <ul class="clearfix">
                <li class="agreement clearfix">
                    <span>过户限制</span>
                    <em><?php echo ($car["transfer_limit"]); ?></em>
                    <span>建议起拍价</span>
                    <em><?php echo ($car["suggest_bid_start_price"]); ?></em>
                    <span>保留价</span>
                    <em><?php echo ($car["reserve_price"]); ?></em>
                    <span>建议价</span>
                    <em><?php echo ($car["suggest_price"]); ?></em>
                </li>
                <li class="agreement1 clearfix">
                    <span><img src="<?php echo ($procedure["protocol_pic"]); ?>@216h_180w" /><em>协议照片点击看大图</em></span>
                </li>
            </ul>
        </div>
        <?php if($car["car_status"] == 1): ?><div class="testing">
                <h4>审核结果</h4>
                <ul class="shenhei-tongguo">
                    <li class="trial clearfix">

                            <input class="sheng_hover approve" data-id="1" type="button"  value="审核通过" >

                        <input class="no-pass" data-id="3" type="button" value="审核驳回">
                        <input class="no-pass" data-id="2" type="button" value="审核失败">
                    </li>
                </ul>
                <div class="textarea-content">
                    <div class="textarea-list" style="display: block;">

                    </div>
                    <div class="textarea-list clearfix" style="display: none;">
                        <span>*备注</span>
                        <textarea id="reject_area" placeholder="请填写驳回原因，此项为必填写"></textarea>
                    </div>
                    <div class="textarea-list clearfix" style="display: none;">
                        <span>*备注</span>
                        <textarea id="faild_area" placeholder="请填写失败原因，此项为必填写"></textarea>
                    </div>
                </div>
            </div><?php endif; ?>
        <div class="yongBtn1" style="display: none;">
            <input id="sub_check" type="submit" value="确定" class="queding" />
        </div>
        <div class="clear"></div>
    </div>
</div>
<script type="text/javascript" src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery.rotate.min.js"></script>

<!--弹出框效果-->
<div class="sunbox-alret">
<img src="" />

</div>
<div class="fork"></div>
<div class="xuanzhuan"></div>
<div class="xie-loading"></div>

    <script type="text/javascript">
    $(document).ready(function() {

        $(".testing ul .agreement1 span").click(function(){
            var Img=$(this).find("img").attr("src").split("@");
            $(".xuanzhuan").fadeIn();
            $(".fork").fadeIn();
            $(".pageBeijing").css("display","block");
            $(".xie-loading").fadeIn();

            $(".sunbox-alret img").attr("src",Img[0]).get(0).onload=function(){
                $(".sunbox-alret").fadeIn();
                $(".sunbox-alret").rotate(0);
                $(".xie-loading").fadeOut();
                $(".sunbox-alret").css("top",$(window).scrollTop());
                $(".sunbox-alret").css({
                    "marginTop":100,
                    "marginLeft":-$(".sunbox-alret").outerWidth()/2
                })
            };
        })
        var num = 0;
        $(function(){
            $(".xuanzhuan").click(function(){
                num ++;
                $(".sunbox-alret").rotate(90*num);
            })
        })

        $(".fork").click(function(){
            $(".pageBeijing").css("display","none");
            $(".sunbox-alret").fadeOut();
            $(".xuanzhuan").fadeOut();
            $(".fork").fadeOut();
            $(".xie-loading").fadeOut();
            $(".sunbox-alret img").attr("src","");
            num = 0;
        })

        // 历史报告切换
        $(function(){
            $(".presentation span").hide();
            var oLiNum=$(".presentation ul li").length;
            var oLiW=$(".presentation ul li").width()*oLiNum;
            var num=0;
            if(oLiW>920){
                $(".presentation span").show();
            }else{
                $(".presentation span").hide();
            }
            $(".presentation span .leftBtn").hide();

            $(".presentation span .rightBtn").click(function(){
                $(".presentation span .leftBtn").show()
                num++;
                $(".presentation ul").animate({
                    "marginLeft":-$(".presentation ul li").width()*num+"px"
                });
                var wMin=-(oLiNum-9)*$(".presentation ul li").width();
                if(wMin==-$(".presentation ul li").width()*num){
                    $(".presentation span .rightBtn").hide();
                }
            })
            $(".presentation span .leftBtn").click(function(){
                num--;
                $(".presentation ul").animate({
                    "marginLeft":-$(".presentation ul li").width()*num+"px"
                });
                $(".presentation span .rightBtn").show();
                if(-$(".presentation ul li").width()*num>=0){
                    $(".presentation span .leftBtn").hide();

                }
            })
            $(".presentation ul li").click(function(){
                $(".presentation ul li").removeClass("cuurent");
                $(this).addClass("cuurent");
                var index=$(".presentation ul li").index(this);
                $(".presentation-cont .jianCeBox").eq(index).show().siblings().hide();
            })
        })

    });    
        $(".approve").click(function(){
            confirm_alert('<div style="color:red">确定审核成功吗？</div>', confirm);
            function confirm() {
                $('.determine').click(function () {
                    colse_hide();
                    postCheck(1,'');
                });
            }

        });        
                
        $("#sub_check").click(function(){
            var status = $(".sheng_hover").attr("data-id");
            var msg = (status==3) ? "确定审核驳回吗" : "确认审核失败吗?" ;
            confirm_alert('<div style="color:red">'+ msg +'</div>', confirm_rejected);
            function confirm_rejected(){
                $('.determine').click(function () {
                    var status = $(".sheng_hover").attr("data-id");
                    var remark = '';
                    if(status==3){
                        remark = $("#reject_area").val();
                    }
                    if(status==2){
                        remark = $("#faild_area").val();
                    }
                    if(remark==''){
                        shibai_alert("备注为必选项", 1500);
                        return false;
                    }
                    postCheck(status,remark);
                });
            }
        });
        
        function postCheck(status,remark){
            $.post("/DetectionCheck/saveCheck",{"remark":remark,"status":status,"car_id":<?php echo $car['car_id'];?>},function(data){
                if(data.code!=200){
                    shibai_alert(data.msg, 1500);
                    return false;
                }
                btn_alert("操作成功",1500, function(){
                    //location.href=document.referrer
                    $(window.opener.document).find(".suoSou").trigger("click");
                    colse_hide();
                    self.close();
                });
            },"json");
        }
    </script>
    <div class="xieyi"><span>×</span><img src="#" /></div>
<div class="yunBei"></div>
<div class="loading"></div>
</body>
</html>